import { xsEntity } from './commentity';
import { Column, Entity, ManyToOne, OneToMany } from 'typeorm';
import { FoodEntity } from './food';
import { ShopEntity } from './shop';
// import { FoodEntity } from './food';

/**
 * 描述
 */
@Entity()
export class ClassfootEntity extends xsEntity {
    @Column({ comment: '分类信息' })
    name: string;

    //  一个分类 可以拥有很多个商品

    // @OneToMany(type => FoodEntity, photo => photo.pid) // note: we will create author property in the Photo class below
    // foots: FoodEntity[];
    //  分类 我一个分类 可以拥有很多个食物 
    @OneToMany(type => FoodEntity, photo => photo.Pid) // note: we will create author property in the Photo class below
    foods: FoodEntity[];

    @ManyToOne(type => ShopEntity, author => author.shopfoodsclassify)
    shopid: ShopEntity




}
